package com.supergdtop.www.run.activity;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Window;

import com.asum.xmaterialview.tools.XMViewConfig;
import com.asum.xtoolbar.utils.XTopBarConfig;
import com.asum.xuidesign.utils.XDesigner;
import com.supergdtop.www.run.finaldata.FontSize;
import com.supergdtop.www.run.finaldata.Global;
import com.supergdtop.www.run.finaldata.XColor;


/**
 * 界面基类
 * Created by Asum on 2016/5/31 0031.
 */
public class BaseActivity extends FragmentActivity {
    protected XDesigner designer;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //this.requestWindowFeature(Window.FEATURE_NO_TITLE);

        //initializeXTopBarConfig();
        //initializeXMViewConfig();
        initializeOtherConfig();
    }

    private void initializeXTopBarConfig() {
        XTopBarConfig.BUTTON_TEXT_SIZE = FontSize.s15(getApplicationContext());
        XTopBarConfig.LEFT_RIGHT_PADDING = Global.padding(getApplicationContext());
        XTopBarConfig.TITLE_COLOR = XColor.WHITE;
        XTopBarConfig.TITLE_IN_CENTER = true;
        XTopBarConfig.TITLE_TEXT_SIZE = FontSize.s18(getApplicationContext());
    }

    private void initializeXMViewConfig() {
        XMViewConfig.DURATION_FAST = Global.DURATION_FAST;
        XMViewConfig.DURATION_SLOW = Global.DURATION_SLOW;
        XMViewConfig.INTERVAL = Global.INTERVAL;
        XMViewConfig.RIPPLE_ALPHA = Global.RIPPLE_ALPHA;
        XMViewConfig.RIPPLE_COLOR = XColor.SPREAD;
    }

    private void initializeOtherConfig() {
        designer = new XDesigner();
    }
}
